﻿using YNTK.Common.Const;
using YNTK.Common.Entity;
using SqlSugar;
using System;

namespace YNTK.System.Entitys.Permission
{
    /// <summary>
    /// 组织信息实体
    /// 版 本：V1.0.0.0.0
    /// 版 权：云南通科科技有限公司（https://www.yntkkj.com）
    /// 作 者：李仕鹏
    /// 日 期：2022.09.30
    /// </summary>
    [SugarTable("BASE_ORGANIZE")]
    [Tenant(ClaimConst.TENANT_ID)]
    public class OrganizeEntity : CLDEntityBase
    {
        /// <summary>
        /// 机构上级
        /// </summary>
        [SugarColumn(ColumnName = "F_PARENTID")]
        public string ParentId { get; set; }

        /// <summary>
        /// 机构分类【company-公司、department-部门】
        /// </summary>
        [SugarColumn(ColumnName = "F_CATEGORY")]
        public string Category { get; set; }

        /// <summary>
        /// 机构编码
        /// </summary>
        [SugarColumn(ColumnName = "F_ENCODE")]
        public string EnCode { get; set; }

        /// <summary>
        /// 组织全称
        /// </summary>
        [SugarColumn(ColumnName = "F_FULLNAME")]
        public string FullName { get; set; }

        /// <summary>
        /// 组织简称
        /// </summary>
        [SugarColumn(ColumnName = "F_OrganizeName")]
        public string OrganizeName { get; set; }

        /// <summary>
        /// 授权TK码
        /// </summary>
        [SugarColumn(ColumnName = "F_AuthorizationCode")]
        public string AuthorizationCode { get; set; }

        /// <summary>
        /// 机构主管
        /// </summary>
        [SugarColumn(ColumnName = "F_MANAGERID")]
        public string ManagerId { get; set; }

        /// <summary>
        /// 扩展属性
        /// </summary>
        [SugarColumn(ColumnName = "F_PROPERTYJSON")]
        public string PropertyJson { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [SugarColumn(ColumnName = "F_DESCRIPTION")]
        public string Description { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        [SugarColumn(ColumnName = "F_SORTCODE")]
        public long? SortCode { get; set; }

        /// <summary>
        /// 状态(0.未开通 1.已开通 2.服务到期)
        /// </summary>
        [SugarColumn(ColumnName = "F_State")]
        public int? State { get; set; }

        /// <summary>
        /// 行政区划,如云南省-昆明市
        /// </summary>
        [SugarColumn(ColumnName = "F_AdministrativeArea")]
        public string AdministrativeArea { get; set; }

        /// <summary>
        /// 首次开通日期
        /// </summary>
        [SugarColumn(ColumnName = "F_FirstOpeningDate")]
        public DateTime? FirstOpeningDate { get; set; }

        /// <summary>
        /// 最近一次开通日期
        /// </summary>
        [SugarColumn(ColumnName = "F_OpeningDate")]
        public DateTime? OpeningDate { get; set; }

        /// <summary>
        /// 授权期限起
        /// </summary>
        [SugarColumn(ColumnName = "F_MandateStart")]
        public DateTime? MandateStart { get; set; }

        /// <summary>
        /// 授权期限止
        /// </summary>
        [SugarColumn(ColumnName = "F_MandateEnd")]
        public DateTime? MandateEnd { get; set; }
    }
}
